import os, sys

try:
	import pygtk
	pygtk.require ("2.0")
	import gtk
	import gtk.glade
	import gobject
except:
	sys.exit (1)

class window1:
	def __init__(self):
		xml = gtk.glade.XML('test1.glade', 'window1')
		self.window = self.window1 = xml.get_widget('window1')
		self.entry1 = xml.get_widget('entry1')
		self.button1 = xml.get_widget('button1')
		
		self.window.connect("destroy", self.window_destroy)
		self.button1.connect ("clicked", self.button1_cb)
		
	def run(self):
		self.window.show_all()
		gtk.main()
	
	def window_destroy(self, *args):
		self.window.destroy()
		gtk.main_quit()
	
	def button1_cb(self, *args):
		self.window.destroy()

if __name__ == '__main__':
	window1().run()